import {
  WithBrace,
  WithBracket,
  WithParenthesis,
  tradeAssemble,
} from "./dropdown-modal.effect.mjs";
import {
  DropdownComponent,
  DropdownCtrl,
  DropdownDirective,
} from "./dropdown.effect.mjs";
import { ModalDemoCtrl, ModalInstanceCtrl } from "./modal.effect.mjs";

export { default, subRoutingUIB } from "./index.mjs";

/**
 * @param {ng.IModule} app
 */
const initModal = (app) => {
  app
    .controller("ModalDemoCtrl", ModalDemoCtrl)
    .controller("ModalInstanceCtrl", ModalInstanceCtrl);
};

__App__ && initModal(__App__);

/**
 * @param {ng.IModule} app
 */
const initDropdown = (app) => {
  app
    .controller("DropdownCtrl", DropdownCtrl)
    .component("dropdownComponent", DropdownComponent)
    .directive("dropdownMenuFill", DropdownDirective);
};

__App__ && initDropdown(__App__);

/**
 * @param {ng.IModule} app
 */
const initDropdownModal = (app) => {
  app
    .filter("tradeAssemble", tradeAssemble)
    .filter("WithParenthesisAssemble", WithParenthesis)
    .filter("WithBraceAssemble", WithBrace)
    .filter("WithBracketAssemble", WithBracket);
};

__App__ && initDropdownModal(__App__);
